package com.xpresso.utils.sockets;

import com.xpresso.utils.exceptions.XpressoException;

public class SimpleOutSocketHandler implements ISocketHandler {

	public int getPortNumber() {
		return 1633;
	}

	public String handleData(String data, XSocket socket)  throws XpressoException{
		System.out.println("Received: " + data);
		try {
			socket.sendData("Ok, I got this from you: " + data);
		} catch (XpressoException e) {
			// TODO: Log this
			throw e;
		}
		return "OK";
	}

	public void handleSocketReady() {
		// We let the subclasses decide what to do.
	}

}
